<template>
  <div class="noticeTipView">
    <button @click = "openToast">顶部提示</button>
    <button @click = "openToastfail">中间提示</button>
    <button @click = "openToastopps">底部提示</button>
  </div>
</template>

<script>
import AlertNoticeTip from '@/components/noticeTip.js';
export default {
  data(){
    return{
    }
  },
  methods:{
    openToast(){
      AlertNoticeTip({
          message:"顶部的提示",
          opts: function() {
            console.log('这里写回调函数')
          }
      });
    },
    openToastfail(){
        AlertNoticeTip({
          message:"中间的提示",
          duration:1000,
          type:"center",
          color:'red',
          backgroundColor:'orange',
      });
    },
    openToastopps(){
      AlertNoticeTip({
        message:"底部的提示",
        type:'bottom',
        duration:3000,
      });
    }
  }

}
</script>
<style>
  .noticeTipView{
      margin-top: 100px;
  }
</style>
